\documentclass{article}
\usepackage[x11names, rgb]{xcolor}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{snakes,arrows,shapes}
\usepackage{amsmath}
%
%

%

%

\begin{document}
\pagestyle{empty}
%
%
%

\enlargethispage{100cm}
% Start of code
% \begin{tikzpicture}[anchor=mid,>=latex',line join=bevel,]
\begin{tikzpicture}[>=latex',line join=bevel,]
  \pgfsetlinewidth{1bp}
%%
\begin{scope}
  \pgfsetstrokecolor{black}
  \draw (51bp,18bp) node {Preprocessing};
\end{scope}
  \pgfsetcolor{black}
  % Edge: D -> gSpan
  \draw [->] (51bp,180bp) .. controls (51bp,172bp) and (51bp,163bp)  .. (51bp,144bp);
  % Edge: gSpan -> S
  \draw [->] (51bp,108bp) .. controls (51bp,100bp) and (51bp,91bp)  .. (51bp,72bp);
  % Node: S
\begin{scope}
  \pgfsetstrokecolor{black}
  \draw (78bp,72bp) -- (24bp,72bp) -- (24bp,36bp) -- (78bp,36bp) -- cycle;
  \draw (51bp,54bp) node {$\mathcal{S}$};
\end{scope}
  % Node: D
\begin{scope}
  \pgfsetstrokecolor{black}
  \draw (78bp,216bp) -- (24bp,216bp) -- (24bp,180bp) -- (78bp,180bp) -- cycle;
  \draw (51bp,198bp) node {$\mathcal{D}$};
\end{scope}
  % Node: gSpan
\begin{scope}
  \pgfsetstrokecolor{black}
  \draw (51bp,144bp) -- (24bp,126bp) -- (51bp,108bp) -- (78bp,126bp) -- cycle;
  \draw (51bp,126bp) node {$gSpan$};
\end{scope}
%
\end{tikzpicture}
% End of code

%
\end{document}
%



